home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earcd / utils / keyreq / install < prev    next >
Text File  |  1998-01-16  |  16KB  |  447 lines

  1.  
  2. ;***********
  3. ;*         *
  4. ;* STRINGS *
  5. ;*         *
  6. ;***********
  7.  
  8. (set #LANG_FOUND 0)
  9.  
  10. (if (= "deutsch" @language)
  11.        (
  12.         (set #MSG_READIMPORTANT "\nBitte lesen Sie \"Important\" bevor Sie KeyReq installieren.\n\nDas Installations-Skript wird erst funktionieren, wenn das gemacht wurde!!")
  13.  
  14.     (set #MSG_WELCOME "Willkommen beim Installations-Skript für \"KeyReq\".")
  15.     (set #MSG_WELCOME_WARN "\n\nSie benutzen eine alte Version (<42) des Installers. Das könnte unter Umständen Probleme bereiten!")
  16.  
  17.     (set #MSG_SELECTEXEPATH "In welches Verzeichnis soll das Programm  (\"KeyReq\") kopiert werden?")
  18.     (set #MSG_SELECTDOCPATH "In welches Verzeichnis soll die Dokumentation (\"KeyReq.guide\") kopiert werden?")
  19.  
  20.     (set #MSG_WHERESTART "Von wo soll KeyReq während des Bootens gestartet werden?")
  21.     (set #MSG_DONTSTART "KeyReq nicht beim Booten starten")
  22.  
  23.     (set #MSG_CONFIG "Wollen Sie KeyReq gleich jetzt konfigurieren? Das können Sie auch manuell machen, wenn Sie nach der Installation die KeyReq Start-Zeile in der %s editieren.")
  24.     (set #MSG_CONFIG_OKKEY "Mit welcher Taste (neben RETURN) sollen Requester bestätigt werden können?")
  25.     (set #MSG_CONFIG_CANCELKEY "Mit welcher Taste (neben ESC) sollen Requester abgebrochen werden können?")
  26.     (set #MSG_CONFIG_COMMAND "Wollen Sie, daß LAMIGA zusätzlich zu den vorher definierten Tasten gedrückt werden muß (gilt nicht für RETURN und ESC)?")
  27.     (set #MSG_CONFIG_POS "An welcher Position sollen die Requester erscheinen?")
  28.     (set #MSG_CONFIG_POS_NORMAL "In der linken oberen Ecke des Screens")
  29.     (set #MSG_CONFIG_POS_CENTER "In der Mitte des Screens")
  30.     (set #MSG_CONFIG_POS_MOUSE "Unter dem Mauszeiger")
  31.     (set #MSG_CONFIG_HIGHLIGHT "Wollen Sie, daß das aktive Gadget eines Requesters gehighlighted wird (mit einem Rechteck, siehe \"Screenshot.png\")?")
  32.     (set #MSG_CONFIG_PENRGB "Soll zum Zeichnen des Highlight Rechteckes ein Pen aus der DrawInfo Struktur verwendet werden?")
  33.     (set #MSG_CONFIG_PENRGB_PEN "Ja. Pennummer bestimmen ... ")
  34.     (set #MSG_CONFIG_PENRGB_RGB "Nein. RGB-Farbwert bestimmen ...")
  35.     (set #MSG_CONFIG_HIGHPEN "Welcher DRIPen soll zum Zeichnen des Highlight-Rechteckes verwendet werden (siehe Guide)?")
  36.     (set #MSG_CONFIG_HIGHRGB "Welcher Farbe soll zum Zeichnen des Highlight-Recheckes verwendet werden (Format: 0xRRGGBB)?")
  37.     (set #MSG_CONFIG_TAB "Wollen Sie, daß man mit TAB zwischen den Gadgets cyclen kann (wie bei MUI)?")
  38.     (set #MSG_CONFIG_KEYGAD "Soll das KeyGadget Feature benutzt werden (bei Tastendruck wird entsprechendes Gadget selektiert gezeichnet, und man kann Tastendruck 'abbrechen', siehe Guide)?")
  39.     (set #MSG_CONFIG_SOUND "Soll KeyReq mit SoundJunkie von George Hornmoen zusammenarbeiten, damit bei Erscheinen eines Requesters ein (vom Requester-Typ abhängiger und konfigurierbarer) Soundeffekt abgespielt wird?")
  40.  
  41.     (set #MSG_FA "Es wird nun ein Programm gestartet, mit dem Sie auswählen können, an welcher Stelle in der %s KeyReq gestartet werden soll. Sie sollten die vorgeschlagene Position nur ändern, wenn Sie wirklich wissen, was Sie tun!")
  42.     (set #MSG_FA2 "\n\nWenn Sie KeyReq bereits in der %s haben, können Sie mit CONTROL + LINKER MAUSTASTE die entsprechenden Zeilen herauslöschen.\n\nVor dem Speichern der geänderten %s wird ein Backup davon gemacht!")
  43.  
  44.     (set #MSG_COPY_EXE "Kopiere KeyReq")
  45.     (set #MSG_COPY_DOC "Kopiere Dokumentation")
  46.  
  47.     (set #MSG_ICONPOS "Korrigiere Icon Position")
  48.  
  49.     (set #MSG_NOHELP "Keine Hilfe verfügbar. Sorry. Ich bin einfach zu faul :-( Lesen Sie das \"KeyReq.guide\"!")
  50.     (set #MSG_DONE "\nDie Installation von KeyReq ist abgeschlossen.\n\nDer Source-Code von KeyReq wurde nicht auf Ihre Festplatte kopiert. Machen Sie das manuell, wenn Sie daran interessiert sind.")
  51.  
  52.     (set #LANG_FOUND 1)
  53.        )
  54. )
  55.  
  56. (if (= "italiano" @language)
  57.        (
  58.         (set #MSG_READIMPORTANT "\nLegga prima il file \"Important\".\n\nLo script di installazione funzionerà solo dopo aver fatto questo!!")
  59.  
  60.     (set #MSG_WELCOME "Benvenuto nello script di installazione per \"KeyReq\".")
  61.     (set #MSG_WELCOME_WARN "\n\nLei possiede una versione vecchia (<42) dell'Installer. Questo potrebbe eventualmente causare dei problemi!")
  62.  
  63.     (set #MSG_SELECTEXEPATH "In che directory devo copiare il programma (\"KeyReq\")?")
  64.     (set #MSG_SELECTDOCPATH "In che directory devo copiare la documentazione (\"KeyReq.guide\")?")
  65.  
  66.     (set #MSG_WHERESTART "Da dove deve essere lanciato KeyReq durante il boot")
  67.     (set #MSG_DONTSTART "Non lanciare KeyReq durante il boot")
  68.  
  69.     (set #MSG_CONFIG "Vuole configurare KeyReq subito? Questo può essere fatto anche dopo l'installazione editando la start-line di KeyReq nella %s.")
  70.     (set #MSG_CONFIG_OKKEY "Che tasto (RETURN da parte) vuole usare per confermare un requester?")
  71.     (set #MSG_CONFIG_CANCELKEY "Che tasto (ESC da parte) vuole usare per annullare un requester?")
  72.     (set #MSG_CONFIG_COMMAND "Vuole che sia necessario premere anche LAMIGA per poter usare i tasti definiti prima (non vale per RETURN/ESC)?")
  73.     (set #MSG_CONFIG_POS "In che posizione devono apparire i requester?")
  74.     (set #MSG_CONFIG_POS_NORMAL "Nell'angolo in alto a sinistra dello schermo")
  75.     (set #MSG_CONFIG_POS_CENTER "Nel centro dello schermo")
  76.     (set #MSG_CONFIG_POS_MOUSE "Sotto il puntatore del mouse")
  77.     (set #MSG_CONFIG_HIGHLIGHT "Vuole che il gadget attivo dei requester venga 'highlighted' (con un rettangolo intorno al gadget, vedi \"Screenshot.png\")?")
  78.     (set #MSG_CONFIG_PENRGB "Deve essere usuato un pen della DrawInfo per il rendering del rettangolo?")
  79.     (set #MSG_CONFIG_PENRGB_PEN "Si. Definire numero del pen ...")
  80.     (set #MSG_CONFIG_PENRGB_RGB "No. Definire un valore RGB ...")
  81.     (set #MSG_CONFIG_HIGHPEN "Che DRIPen deve essere usato (vedi guida)?")
  82.     (set #MSG_CONFIG_HIGHRGB "Che colore deve essere usato (in formato: 0xRRGGBB)?")
  83.     (set #MSG_CONFIG_TAB "Vuole che sia possible 'cyclare' tra i gadgets del requester con TAB (come in MUI)?")
  84.     (set #MSG_CONFIG_KEYGAD "Deve essere attivato il KeyGadget feature (quando si preme un tasto il gadget relativo verrà renderizzato in modo selettato e sarà possibile 'annulare' la premuta di tasto, vedi guida)?")
  85.     (set #MSG_CONFIG_SOUND "KeyReq supporta SoundJunkie di George Hornmoen per far suonare al computer un effetto sonoro configurabile (e dipendente dal tipo di requester) ogni volta che un requester appare. Vuole attivare la relativa opzione?")
  86.  
  87.     (set #MSG_FA "Adesso sarà lanciato un programma che permette di scegliere in che posizione (quando) far lanciare KeyReq. Cambiare la posizione predefinita solo se è veramente sicuro di quello che fa!")
  88.     (set #MSG_FA2 "\n\nSe KeyReq si trova di già nella %s si possono cancellare le linee corrispondenti con CONTROL + TASO SINISTRO MOUSE.\n\nPrima del salvataggio della %s cambiata ne sarà fatto un backup!")
  89.  
  90.     (set #MSG_COPY_EXE "Copio KeyReq")
  91.     (set #MSG_COPY_DOC "Copio documentazione")
  92.     
  93.     (set #MSG_ICONPOS "Corrego posizione dell'icona")
  94.  
  95.     (set #MSG_NOHELP "Nessun aiuto disponibile. Sorry. Sono troppo pigro :-( Leggi il \"KeyReq.guide\"!")
  96.     (set #MSG_DONE "\nL'installazione di KeyReq è finita.\n\nLe sorgenti di KeyReq non sono stati copiati sul suo HD. Lo faccia manualmente se è interessato.")
  97.  
  98.         (set #LANG_FOUND 1)
  99.        )
  100. )
  101.  
  102. (if (= 0 #LANG_FOUND)
  103.        (
  104.         (set #MSG_READIMPORTANT "\nPlease read \"Important\" before installing KeyReq.\n\nThe installation script will only work after having done that!!")
  105.  
  106.     (set #MSG_WELCOME "Welcome to the installation script for \"KeyReq\".")
  107.     (set #MSG_WELCOME_WARN "\n\nYou are using an old version (<42) of the Installer. This might eventually cause problems!!")
  108.  
  109.     (set #MSG_SELECTEXEPATH "Where do you want the executable (\"KeyReq\") to be copied?")
  110.     (set #MSG_SELECTDOCPATH "Where do you want the documentation (\"KeyReq.guide\") to be copied?")
  111.  
  112.     (set #MSG_WHERESTART "From where do you want KeyReq do be started during boot?")
  113.     (set #MSG_DONTSTART "Don't start KeyReq during boot")
  114.  
  115.     (set #MSG_CONFIG "Do you want to configure KeyReq right now? You can also do this manually by editing the KeyReq start line in the %s after installation is finished.")
  116.     (set #MSG_CONFIG_OKKEY "With which key (apart from RETURN) shall it be possible to confirm requesters?")
  117.     (set #MSG_CONFIG_CANCELKEY "With which key (apart from ESC) shall it be possible to abort requesters?")
  118.     (set #MSG_CONFIG_COMMAND "Do you want LAMIGA be necessary to be pressed together with the keys defined before (apart from RETURN/ESC)?")
  119.     (set #MSG_CONFIG_POS "At which position do you want the requesters to be opened?")
  120.     (set #MSG_CONFIG_POS_NORMAL "In the upper left corner of the screen")
  121.     (set #MSG_CONFIG_POS_CENTER "In the center of the screen")
  122.     (set #MSG_CONFIG_POS_MOUSE "Under the mouse pointer")
  123.     (set #MSG_CONFIG_HIGHLIGHT "Do you want the active gadget of a requester to be highlighted (with a rectangle, see \"Screenshot.png\"?")
  124.     (set #MSG_CONFIG_PENRGB "Shall a DrawInfo pen be used for the drawing of the rectangle?")
  125.     (set #MSG_CONFIG_PENRGB_PEN "Yes. Define pen number ...")
  126.     (set #MSG_CONFIG_PENRGB_RGB "No. Define a RGB color value ...")
  127.     (set #MSG_CONFIG_HIGHPEN "Which DRIPen shall be used for the highlight rectangle (see guide)?")
  128.     (set #MSG_CONFIG_HIGHRGB "Which color shall be used for the highlight rectangle (format: 0xRRGGBB)?")
  129.     (set #MSG_CONFIG_TAB "Shall it be possible to cycle through the gadgets with TAB (similiar to MUI)?")
  130.     (set #MSG_CONFIG_KEYGAD "Shall the KeyGadget feature be used (when pressing a key the relative gadget will be rendered in selected state and it will be possible to 'abort' key presses, see guide)?")
  131.     (set #MSG_CONFIG_SOUND "KeyReq supports SoundJunkie from George Hornmoen making it possible to have a configurable (and requester dependant) sample played each time a requester pops up. Do you want the relative option to be activated?")
  132.  
  133.     (set #MSG_FA "Now a program will be started that allows you to select at which position to insert KeyReq in the %s. Change the predefined position only if you really know what you do!")
  134.     (set #MSG_FA2 "\n\nIf KeyReq is already in your %s you can delete the corresponding lines by using CONTROL + LEFT MOUSE BUTTON.\n\nBefore saving the changed %s a backup of it will be created!")
  135.  
  136.     (set #MSG_COPY_EXE "Copying KeyReq")
  137.     (set #MSG_COPY_DOC "Copying documentation")
  138.     
  139.     (set #MSG_ICONPOS "Correcting icon position")
  140.  
  141.     (set #MSG_NOHELP "No help available. Sorry. I'm just too lazy :-( Have a look at \"KeyReq.guide\"!")
  142.     (set #MSG_DONE "\nThe installation of KeyReq is finished.\n\nThe source code of KeyReq has not been copied to your HD. Do this manually if you are interested in them.")
  143.  
  144.        )
  145. )
  146.  
  147. ;==========================================================================
  148.  
  149. (if (<> 0 (exists "MustReadImportant"))
  150.      (abort #MSG_READIMPORTANT)
  151. )
  152.  
  153. ;********
  154. ;*      *
  155. ;* MAIN *
  156. ;*      *
  157. ;********
  158.  
  159. (set #OSVERSION (/ (getversion) 65536))
  160.  
  161. (if (< (/ @installer-version 65536) 42)
  162.     (welcome #MSG_WELCOME #MSG_WELCOME_WARN)
  163.     (welcome "\n" #MSG_WELCOME)
  164. )
  165.  
  166. ;******************
  167. ;*                *
  168. ;* SELECT EXE DIR *
  169. ;*                *
  170. ;******************
  171.  
  172. (set #exedest
  173.     (Expandpath
  174.         (askdir (prompt #MSG_SELECTEXEPATH)
  175.             (default "SYS:C")
  176.             (help #MSG_NOHELP)
  177.         )
  178.     )
  179. )
  180.  
  181. ;******************
  182. ;*                *
  183. ;* SELECT DOC DIR *
  184. ;*                *
  185. ;******************
  186.  
  187. (set #docdest
  188.     (Expandpath
  189.         (askdir (prompt #MSG_SELECTDOCPATH)
  190.             (default "HELP:")
  191.             (help #MSG_NOHELP)
  192.         )
  193.     )
  194. )
  195.  
  196. ;************************
  197. ;*                      *
  198. ;* ASK WEHRE TO START   *
  199. ;*                      *
  200. ;************************
  201.  
  202. (set #startwahl
  203.  (askchoice 
  204.      (prompt #MSG_WHERESTART)
  205.      (choices "Startup-Sequence" "User-Startup" #MSG_DONTSTART)
  206.      (default 0)
  207.      (help #MSG_NOHELP)
  208.  )
  209. )
  210.  
  211. (if (= #startwahl 0)
  212.     (set #startfile "Startup-Sequence")
  213.     (set #startfile "User-Startup")
  214. )
  215.  
  216.  
  217. ;
  218. ;if startwahl <> nirgends then
  219. ;
  220. (if (<> #startwahl 2)
  221.  
  222.  (
  223.  
  224. ;************************
  225. ;*                      *
  226. ;* CONFIGURATION        *
  227. ;*                      *
  228. ;************************
  229.  
  230. (if (= 1 (askbool
  231.         (prompt (#MSG_CONFIG #startfile))
  232.         (help #MSG_NOHELP)
  233.         (default 1)
  234.      )
  235.     )
  236.  (
  237.  
  238.  
  239. ;** OK_KEY
  240.  
  241.      (set #string (askstring (prompt #MSG_CONFIG_OKKEY)
  242.                      (default "V")
  243.                      (help #MSG_NOHELP)
  244.               )
  245.      )
  246.      
  247.      (if (<> #string "V")
  248.          (set #exeargs (cat #exeargs " OK_KEY=" #string))
  249.      )
  250.  
  251.  
  252. ;** CANCEL_KEY
  253.  
  254.      (set #string (askstring (prompt #MSG_CONFIG_CANCELKEY)
  255.                      (default "B")
  256.                      (help #MSG_NOHELP)
  257.               )
  258.      )
  259.      
  260.      (if (<> #string "B")
  261.          (set #exeargs (cat #exeargs " CANCEL_KEY=" #string))
  262.      )
  263.  
  264.  
  265. ;** COMMAND
  266.  
  267.     (if (= 0 (askbool (prompt #MSG_CONFIG_COMMAND)
  268.                (default 1)
  269.                (help #MSG_NOHELP)
  270.          )
  271.         )
  272.         (set #exeargs (cat #exeargs " NOCOMMAND"))
  273.     )
  274.  
  275.  
  276. ;** REQ POSITION
  277.  
  278.     (set #integer (askchoice (prompt #MSG_CONFIG_POS)
  279.                  (choices #MSG_CONFIG_POS_NORMAL #MSG_CONFIG_POS_CENTER #MSG_CONFIG_POS_MOUSE)
  280.                  (help #MSG_NOHELP)
  281.                  (default 0)
  282.               )
  283.     )
  284.     
  285.     (if (= 1 #integer)
  286.         (set #exeargs (cat #exeargs " CENTERREQ"))
  287.     )
  288.     
  289.     (if (= 2 #integer)
  290.         (set #exeargs (cat #exeargs " MOUSEREQ"))
  291.     )
  292.  
  293. ;** HIGHLIGHT
  294.     
  295.     (if (= 1 (askbool (prompt #MSG_CONFIG_HIGHLIGHT)
  296.               (default 1)
  297.               (help #MSG_NOHELP)
  298.          )
  299.         )
  300.         (
  301.          (set #integer 0)
  302.          (if (> #OSVERSION 38)
  303.             (
  304.               (set #integer (askchoice (prompt #MSG_CONFIG_PENRGB)
  305.                             (choices #MSG_CONFIG_PENRGB_PEN #MSG_CONFIG_PENRGB_RGB)
  306.                            (default 0)
  307.                            (help #MSG_NOHELP)
  308.                        )
  309.              )
  310.              (set #maxpen 11)
  311.             )
  312.             ;else OS<39
  313.             (
  314.              (set #maxpen 9)
  315.             )
  316.          )
  317.          
  318.          (if (= 0 #integer)
  319.           (
  320.            (set #integer (asknumber (prompt #MSG_CONFIG_HIGHPEN)
  321.                            (range 0 #maxpen)
  322.                            (default 4)
  323.                            (help #MSG_NOHELP)
  324.                         )
  325.            )
  326.            
  327.            (if (<> 4 #integer)
  328.              (set #exeargs (cat #exeargs (" HIGHLIGHTCOL=%ld" #integer)))
  329.            )
  330.  
  331.           )
  332.           ;else (RGB bestimmen)
  333.           (
  334.            (set #string (askstring (prompt #MSG_CONFIG_HIGHRGB)
  335.                               (default "0xFF0000")
  336.                               (help #MSG_NOHELP)
  337.                        )
  338.            )
  339.            (set #exeargs (cat #exeargs " HIGHLIGHTRGB=" #string))
  340.            
  341.           )
  342.          )
  343.          
  344.          ;**TAB
  345.  
  346.          (if (= 0 (askbool (prompt #MSG_CONFIG_TAB)
  347.                         (default 1)
  348.                         (help #MSG_NOHELP)
  349.                    )
  350.               )
  351.               (set #exeargs (cat #exeargs " NOTAB"))
  352.          )
  353.  
  354.         )
  355.         ;else (no highlight)
  356.         (
  357.          (set #exeargs (cat #exeargs " NOHIGHLIGHT"))
  358.         )
  359.     )
  360.     
  361. ;** KeyGadget
  362.     (if (= 0 (askbool (prompt #MSG_CONFIG_KEYGAD)
  363.               (default 1)
  364.               (help #MSG_NOHELP)
  365.              )
  366.         )
  367.         (set #exeargs (cat #exeargs " NOKEYGADGET"))
  368.      )
  369.  
  370. ;**SoundJunkie
  371.     (if (= 1 (askbool (prompt #MSG_CONFIG_SOUND)
  372.               (default 0)
  373.               (help #MSG_NOHELP)
  374.              )
  375.         )
  376.         (set #exeargs (cat #exeargs " SOUNDDAEMON"))
  377.      )
  378.  
  379.  )
  380. )
  381.  
  382. ;**************
  383. ;*            *
  384. ;* FILEATTACK *
  385. ;*            *
  386. ;**************
  387.  
  388.  
  389.     (textfile
  390.         (dest "T:KeyReq_Start")
  391.         (append (";BEGIN KeyReq\nrun <>NIL: \"%s\"%s\n;END KeyReq" (tackon #exedest "KeyReq") #exeargs))
  392.         (help #MSG_NOHELP)
  393.         (safe)
  394.     )
  395.  
  396.     (message (#MSG_FA #startfile) (#MSG_FA2 #startfile #startfile))
  397.  
  398.     (if (= #startwahl 0)
  399.         (run ("c/FileAttack T:KeyReq_Start S:%s Backup S:%s.old DefaultAfter #?SetPatch#?" #startfile #startfile))
  400.         (run ("c/FileAttack T:KeyReq_Start S:%s Backup S:%s.old " #startfile #startfile))
  401.     )
  402.  
  403.  )
  404. )
  405.  
  406. ;endif ;// if startwahl <> nirgends then
  407.  
  408. ;**************
  409. ;*            *
  410. ;* COPY FILES *
  411. ;*            *
  412. ;**************
  413.  
  414. (copyfiles (prompt #MSG_COPY_EXE)
  415.        (source "KeyReq")
  416.        (dest #exedest)
  417.        (confirm)
  418.        (help #MSG_NOHELP)
  419. )
  420.  
  421. (copyfiles (prompt #MSG_COPY_DOC)
  422.        (source "")
  423.        (choices "KeyReq.guide" "KeyReq.guide.info")
  424.        (dest #docdest)
  425.        (confirm)
  426.        (infos)
  427.        (help #MSG_NOHELP)
  428. )
  429.  
  430. (if (exists (tackon #docdest "KeyReq.guide.info"))
  431.     (run    ("c/noiconpos %s" (tackon #docdest "KeyReq.guide"))
  432.         (prompt #MSG_ICONPOS)
  433.         (help #MSG_NOHELP)
  434.         (confirm)
  435.     )
  436. )
  437.  
  438. ;***********
  439. ;*         *
  440. ;* THE END *
  441. ;*         *
  442. ;***********
  443.  
  444. (exit #MSG_DONE #MSG_DONE2
  445.     (quiet)
  446. )
  447.